package com.big.patient.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.big.common.result.Result;
import com.big.model.model.buyer.BuyerPhotoCord;
import com.big.patient.service.BuyerPhotoCordService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/patient/buyer")
public class BuyerPhotoController {

     @Autowired
     BuyerPhotoCordService buyerPhotoCordService;

    //买家秀照片组
    @ApiOperation(value = "买家秀照片组")
    @GetMapping("/buyerPhoto/{mId}/{page}/{limit}")
    public Result buyerPhoto(@PathVariable String mId,@PathVariable Long page,@PathVariable Long limit){
        Page<BuyerPhotoCord> pages= new Page<>(page,limit);
        IPage<BuyerPhotoCord> buyerPhotoCordIPage = buyerPhotoCordService.buyerPhotoCordsInfos(pages,mId);
        return  Result.ok(buyerPhotoCordIPage);
    }


}
